This chapter describes how to create action libraries and rule sets for eCognition Architect and how to create a stand alone application that can be installed with eCognition software.
An action is a predefined building block within an image analysis solution. Configured actions can perform different tasks such as object detection, classification or exporting results and sequences of actions represent a ready-to-use solution for accomplishing image analysis tasks.
An action library is a collection of action definitions, which are essentially unconfigured actions; action definitions enable users to specify actions and assemble solutions. To make rule sets usable as unconfigured actions in action libraries, they must be packaged and given a user interface.
In the Analysis Builder window you package pieces of rule sets, each of them solving a specific part of a solution, into action definitions. Action definitions are grouped into libraries and define dependencies on actions. Furthermore, you can create different user interface components (called widgets) for an action library user to adjust action parameters.
For testing the created action libraries with relevant data, you can build analysis solutions in the Analysis Builder window.
As the parameters of an action can be set by users of action libraries using products such as eCognition Architect, you must place adjustable variables in a parameter set.
You should use unique names for variables and must use unique names for parameter sets. We recommend developing adjustable variables of a more general nature (such as ‘low contrast’), which have influence on multiple features instead of having one control per feature.
Additionally, in rule sets to be used for actions, avoid identically named parent processes. This is especially important for proper execution if an eCognition action refers to inactive parts of a rule set.
When creating a Quick Test button in an action, you need to implement a kind of internal communication to synchronize actions with the underlying rule sets. This is realized by integration of specific algorithms to the rule sets that organize the updating of parameter sets, variables, and actions.
These four specific algorithms are:
The first two transfer values between the action and parameter set; the remaining two transfer values between the parameter set and the rule set.
To get all parameters from the action to the rule set before you execute a Quick Test, you need a process sequence like this:
NOTE: General settings must be updated if a rule set relies on them. You should restore everything to the previous state when the quick test is done.
The developed rule set (.dcp file) will probably be maintained by other developers. Therefore, we recommend you structure the rule set clearly and document it using meaningful names of process groups or comments. A development style guide may assure consistency in the naming of processes, classes, variables and customized features, and provide conventions for structuring rule sets.
An action can contain workspace automation subroutines and produce subsets, copies, or tiles as a internal activity of an action. Such actions can be executed as rule sets.
If several actions containing multiple workspace automation subroutines are assembled in one solution .dax file, each action is submitted for processing sequentially, or else an action might search for tiles that do not yet exist because the preceding action is still being processed.
Information kept in parameter sets is transferred between the different stages of the workspace automation. Different subroutines of different actions are able to access variables of parameter sets. When creating actions you should use special Variables Operation algorithms to enable actions to automatically exchange parameter sets.
Before wrapping a rule set as an action definition, you have to create a new action library.
When assembling a new action library, you wrap rule sets as action definitions and give them a user interface. Later, you may modify an existing action library.
Selecting Library > Action Library Properties brings up the Edit Action Library dialog box. The dialog has fields which allow you to edit the name and version of your action library.
To create a globally unique identifier (GUID), press the Generate button. Generating a new GUID when an action library is amended is a useful way for a developer to notify an action library user of changes, as the software will tell the user that the identifier is different.
Every action is part of a certain action group. If the appropriate action group does not yet exist, you have to create it.
Action definitions are unconfigured actions, which enable users of action libraries to specify actions that act as building blocks of a specific solution. You can define an action definition by transforming a rule set related to a specified part of the solution. Alternatively, you can import an action definition from an .xml file to an action library.
To edit action definitions, you’ll need to have loaded a rule set file (.dcp file) into the Process Tree window, which contains a rule set related to a specified part of the solution. The rule set must include a parameter set providing variables to be adjusted by the user of the action library.
The new action definition item is added at the bottom of the selected action group.
Providing action definitions to other users requires consideration of dependencies, because actions are often mutually dependent. Dependency items are image layers, thematic layers, image object levels, and classes. To enable the usage of default actions for building solutions, the dependencies on actions concerning dependency items have to be defined. Dependencies can be defined as follows:
If your action library requires a rule set to be loaded, it is necessary to edit the dix file, which is created automatically when a new action library is constructed. Insert a link to the rule set file using the following structure, using a text editor such as Notepad. (The <Preload>
opening and closing tags will already be present in the file.)
<Preload> <Ruleset name="ruleset.dcp"/> </Preload>
A configured solution can be automatically updated after have you have changed one or more actions in the corresponding action library.
This option enables rule set developers to make changes to actions in an action library and then update a solution without reassembling actions as a solution. The menu item is only active when a solution is loaded in the Analysis Builder window.
Before you can analyze your data, you must build an analysis solution in the Analysis Builder window.
To construct your analysis solution, you can choose from a set of predefined actions for object detection, classification and export. By testing them on an open project, you can configure actions to meet your needs. With the Analysis Builder, you assemble and configure these actions all together to form a solution, which you can then run or save to file.
Image analysis solutions are built in the Analysis Builder Window. To open it, go to either View > Windows > Analysis Builder or Analysis > Analysis Builder from the main menu. You can use View > Analysis Builder View to select preset layouts.
When the Analysis Builder window opens, ensure that the name of the desired action library is displayed in the title bar of the Analysis Builder window.
The Analysis Builder window consists of two panes. In the upper pane, you assemble actions to build solutions; in the lower properties pane you can configure them by customizing specific settings. Depending on the selected action, the lower properties pane shows which associated settings to define. The Description area displays information to assist you with the configuration.
The Analysis Builder Toolbar may be used to display widgets that are not attached to an action, but are always available to the user. To open it, go to Analysis > Analysis Builder from the main menu.
To open an existing action library, go to Library > Open Action Library in the main menu. The name of the loaded action library is displayed in the title bar of the Analysis Builder window. The action groups of the library are loaded in the upper pane of the Analysis Builder window.
If you open an action library after opening a project, all rule set data will be deleted. A warning message will display. To restore the rule set data, close the project without saving changes and then reopen it. If you are using a solution built with a older action library, browse to that folder and open the library before opening your solution.
You can close the current action library and open another to get access to another collection of analysis actions. To close the currently open action library, choose Library > Close Action Library from the main menu. The action groups in the upper pane of the Analysis Builder window disappear. When closing an action library with an assembled solution, the solution is removed from the upper pane of the Analysis Builder window. If it is not saved, it must be reassembled.
You can close the current action library and open another to get access to another collection of analysis actions. To close the currently open action library, choose Library > Close Action Library from the main menu. The action groups in the upper pane of the Analysis Builder window disappear. When closing an action library with an assembled solution, the solution is removed from the upper pane of the Analysis Builder window. If it is not saved, it must be reassembled.
In the Analysis Builder window, you assemble a solution from actions and configure them in order to analyze your data. If not already visible, open the Analysis Builder window.
To select an action for the analysis solution of your data, click on a plus sign in an Action Definition button in the Analysis Builder window. The Add Action dialog box opens.
The filter is set for the action subset you selected. You can select a different filter or display all available actions. The Found area displays only those actions that satisfy the filter setting criteria. Depending on the action library, each action is classified with a token for its subsection, e.g. <A> for segmentation and classifications or <B> for export actions.
To search for a specific action, enter the name or a part of the name in the Find Text box. The Found area displays only those actions that contain the characters you entered. Select the desired action and confirm with OK. The new action is displayed as a bar in the Analysis Builder window. You must now set the properties of the action:
For each solution you must define specific settings. These settings associate your image data with the appropriate actions.
To load an already existing solution with all the analysis settings from a solution file (extension .dax) to the Analysis Builder window, go to Library > Load Solution on the main menu. To use a solution that was built with another action library, open the action library before opening your solution. The solution is displayed in the Analysis Builder window.
If you want to change a solution built with an older action library, make sure that the corresponding action library is open before loading the solution. 3
To test and improve analysis:
To get access to new, customized or special actions, you have to load action definitions, which are simply unconfigured actions. If not yet available in the Add Actions dialog box, you can load additional action definitions from a file to an action library. This can be used to update action libraries with externally defined action definitions.
Action definitions can be created with the eCognition Developer. Alternatively, eCognition offers consulting services to improve your analysis solutions. You can order special task actions for your individual image analysis needs.
To use an additional action definition you have import it. Beside the .xml file describing the action definition, you need a rule set file (.dcp file) providing a rule set that is related to a specific part of the solution. The rule set has to include a parameter set providing variables to be adjusted by the user of the action library.
eCognition Developer users have the option of changing the visibility settings for hidden layers and hidden maps (see Tools > Options). This is a global setting and applies to all portals (the setting is stored in the UserSettings.cfg file). The default value in the Options dialog is No and all hidden layers are hidden.
To facilitate the development of ruleware, you can save your configured action with single projects and come back to them later. A saved project includes all actions and their configurations, which are displayed in the Analysis Builder window in the moment the project was saved.
Configured actions can only be restored properly if the open action library was open when saving, because the action library provides corresponding action definitions.
You can create a calibration to store the General Settings properties as a Parameter Set file. Therefore, you can save and provide common settings for common image readers, for example, as part of an application. A calibration set stores the following General Settings properties:
To create a calibration, set the General Settings properties in the lower properties pane of the Analysis Builder window.
For saving, choose Library > Save Calibration from the main menu. By default, calibration parameter set files with the extension .psf are stored in C:\Program Files\Trimble\eCognition Developer\bin\applications.
Widgets are user interface elements, such as drop-down lists, radio buttons and checkboxes, that the users of action libraries can use to adjust settings.
To create a widget in the Analysis Builder window, first select an action definition in the upper pane of the window. You must structure the related parameters in at least one property group in the lower pane of the Analysis Builder window. Right-click the background of the lower pane and select Add Group. Select a group or widget and right-click it to add it – the following widgets are available:
To create a widget in the Analysis Builder Toolbar right-click in the Analysis Build Toolbar and select one of the available widgets in the context menu.
Choose one of the Add (widget) commands on the context menu. The Widget Configuration dialog box opens.
Export an action definition to file. This can be used to extend action libraries of eCognition Architect users with new actions definitions.
1 Standard export actions are predefined. Therefore the underlying processes cannot be edited and some of the following options are unavailable. (↑)
2 Some actions can be selected only once. If such an action is already part of the analysis, it does not appear in the Add Action dialog box (↑)
3 When you open a solution file (extension .dax), the actions are compared with those of the current action library. If the current action library contains an action with the same name as the solution file, the action in the current Action Library is loaded to the Analysis Builder window. This does not apply when using a solution file for automated image analysis. (↑)
To create a standalone application you need:
Follow these simple steps to create your application:
You can customize your application further modifying the respective fields in platform.asd:
Based on the installer for eCognition Architect or Developer you can create a custom installer that will install your application.
If you now execute Setup.exe, your application will be installed.